package com.itheima.printstringdemo;

import java.io.PrintStream;

public class PrintStreamDemo1 {
    public static void main(String[] args) {

        try (
                // 若要追加，得传低级字节输出流 PrintStream ps = new PrintStream(new FileOutputStream("D:\\git\\java-base\\try3.txt", true));
                PrintStream ps = new PrintStream("D:\\git\\java-base\\try3.txt");
                ) {
            ps.println(97);
            ps.println(true);
            ps.println(3.14);
            ps.println('a');
            ps.println("hello");
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
